(function(){"use strict";BX.namespace("BX.UI");BX.UI.AccessRights.Column=function(t){this.layout={container:null};this.grid=t.grid?t.grid:null;this.items=t.items?t.items:[];this.userGroup=t.userGroup?t.userGroup:null;this.accessCodes=t.accessCodes?t.accessCodes:null;this.section=t.section?t.section:null;this.headSection=t.headSection;this.newColumn=t.newColumn?t.newColumn:null;this.openPopupEvent=t.grid.openPopupEvent?t.grid.openPopupEvent:null;this.popupContainer=t.grid.popupContainer?t.grid.popupContainer:null};BX.UI.AccessRights.Column.prototype={getItem:function(t){t=t||{};var e={};if(t.type==="userGroupTitle"){e={type:t.type,text:t.title,controller:t.controller}}if(t.type==="title"){e={id:t.id,type:t.type,hint:t.hint,text:t.title,controller:t.controller}}if(t.type==="toggler"){e={type:t.type,access:t.access}}if(t.type==="variables"){e={type:t.type,text:t.title,variables:t.variables,access:t.access}}if(t.type==="role"){e={type:t.type,text:t.title}}if(t.type==="members"){var i=[];for(var s in t.members){i[s]=t.members[s].type}e={type:t.type,accessCodes:i}}e.column=this;e.userGroup=this.userGroup;e.openPopupEvent=this.openPopupEvent;e.popupContainer=this.popupContainer;e.currentParam=null;e.grid=this.grid;if(t.type==="variables"||t.type==="toggler"){var n=e.access.id;var o=e.userGroup.accessRights;for(var r=0;r<o.length;r++){if(n===o[r].id){e.currentParam=o[r].value}}}return new BX.UI.AccessRights.ColumnItem(e)},getUserGroup:function(){return this.userGroup},remove:function(){if(this.layout.container.classList.toggle("ui-access-rights-column-new")){this.layout.container.classList.remove("ui-access-rights-column-new")}this.layout.container.classList.add("ui-access-rights-column-remove");this.layout.container.style.width=this.layout.container.offsetWidth+"px";BX.bind(this.layout.container,"animationend",function(){this.layout.container.style.minWidth="0px";this.layout.container.style.maxWidth="0px"}.bind(this));setTimeout(function(){this.layout.container.parentNode.removeChild(this.layout.container)}.bind(this),500)},resetClassNew:function(){this.layout.container.classList.remove("ui-access-rights-column-new")},render:function(){if(!this.layout.container){var t=document.createDocumentFragment();if(this.headSection){this.userGroup.type="role";t.appendChild(this.getItem(this.userGroup).render());this.userGroup.type="members";t.appendChild(this.getItem(this.userGroup).render())}this.items.map(function(e){var i=this.getItem(e);t.appendChild(i.render())}.bind(this));this.layout.container=BX.create("div",{props:{className:this.newColumn?"ui-access-rights-column ui-access-rights-column-new":"ui-access-rights-column"}});BX.addCustomEvent("BX.UI.AccessRights:refresh",this.resetClassNew.bind(this));this.layout.container.appendChild(t);return this.layout.container}}}})();
//# sourceMappingURL=column.map.js